feat(notifications): Baileys wa-bridge delivery for WhatsApp invites - #463
Open
islandbitcoin wants to merge 1 commit into
Open
feat(notifications): Baileys wa-bridge delivery for WhatsApp invites#463islandbitcoin wants to merge 1 commit into
islandbitcoin wants to merge 1 commit into
Conversation
No env has a Twilio WhatsApp sender provisioned (TWILIO_WHATSAPP_FROM is unset in TEST and PROD — only the Verify service is wired), so WhatsApp invite delivery has never worked. Add an env-switched provider: when WA_BRIDGE_URL + WA_BRIDGE_SECRET are set, WhatsApp messages go through the flash-support-infra wa-bridge's authed POST /send (Baileys) as plain text with the invite link (no Meta template needed); otherwise the existing Twilio template path is used unchanged. 15s timeout, message content never logged (invite links carry one-time tokens). Intended use: TEST/dev delivery now (bridge endpoint deployed + smoke-tested on pulse-server). Prod should provision the official Twilio WhatsApp sender + approved template before launch, or deliberately opt into the bridge. Tests: bridge transport (auth header, payload shape, non-ok, network error, unconfigured fallback proves the bridge is the succeeding path) + invite body selection (plain text w/ link vs template blob). 4+2 new, suite green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Env-switched WhatsApp delivery provider: when
WA_BRIDGE_URL+WA_BRIDGE_SECRETare set, invite WhatsApp messages go through the flash-support-infra wa-bridge's authedPOST /send(Baileys, plain text + invite link — no Meta template needed); otherwise the existing Twilio template path is unchanged.Why: no environment has a Twilio WhatsApp sender provisioned (
TWILIO_WHATSAPP_FROMunset in TEST and PROD — only the Verify service is wired), so WhatsApp invite delivery has never worked. The bridge endpoint is deployed on pulse-server and smoke-tested (authed, timing-safe compare, 401 negative-controls, content never logged).Scope: TEST/dev delivery now. Prod should provision the official Twilio WhatsApp sender + approved template before launch, or deliberately opt into the bridge.
Tests: 6 new (transport auth/payload/error/fallback + body selection). Suite green; tsc + eslint clean.
🤖 Generated with Claude Code
https://claude.ai/code/session_01C7z7o9J18BWbUnYJcemMtg